import res from '@/utils/request';
import { Card, Col, Collapse, Input, Row, Table, Tabs } from 'antd';
import React from 'react';
const QuickCollapse = ({
  children,
  $schema,
  SingleRender,
  ...rest
}:any)=>{
  console.log({children})
  return <Collapse  >
  {/* {
      children.map(item=>{
        return <Collapse.Panel key={item.key} header={item.key}>{item}</Collapse.Panel>
      })
    } */}
    {
      children.map((item,index)=>{
        
        return <Collapse.Panel key={item.key} header={SingleRender?<SingleRender $schema={item.props.schema.$schema.header}></SingleRender>:`Collapse2 ${index+1}`}>{item}</Collapse.Panel>
      })
    }
  </Collapse>

}
QuickCollapse.Panel = ({children,key,header}:any)=>{
  return children
}
export default QuickCollapse